package cn.sdhuijin.model;

import java.io.Serializable;
import java.util.List;

import javax.persistence.CascadeType;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.ManyToOne;
import javax.persistence.OneToMany;
import javax.persistence.Table;

/**
 * @author sunp@sdhuijin.cn:
 * @version 创建时间：2015年4月29日 上午10:54:25 类说明
 */

@Entity
@Table(name = "standarditem")
public class StandardItem extends IdEntity implements Serializable {

	private static final long serialVersionUID = 1L;

	private String name;

	private String method;

	private String description;

	private double score;

	@ManyToOne
	private StandardFolder standardFolder;

	@OneToMany(cascade = { CascadeType.ALL }, mappedBy = "standardItem", fetch = FetchType.LAZY)
	private List<Deduction> deductions;

	/**
	 * @return the name
	 */
	public String getName() {
		return name;
	}

	/**
	 * @param name
	 *            the name to set
	 */
	public void setName(String name) {
		this.name = name;
	}

	/**
	 * @return the method
	 */
	public String getMethod() {
		return method;
	}

	/**
	 * @param method
	 *            the method to set
	 */
	public void setMethod(String method) {
		this.method = method;
	}

	/**
	 * @return the description
	 */
	public String getDescription() {
		return description;
	}

	/**
	 * @param description
	 *            the description to set
	 */
	public void setDescription(String description) {
		this.description = description;
	}

	/**
	 * @return the score
	 */
	public double getScore() {
		return score;
	}

	/**
	 * @param score
	 *            the score to set
	 */
	public void setScore(double score) {
		this.score = score;
	}

	/**
	 * @return the deductions
	 */
	public List<Deduction> getDeductions() {
		return deductions;
	}

	/**
	 * @param deductions
	 *            the deductions to set
	 */
	public void setDeductions(List<Deduction> deductions) {
		this.deductions = deductions;
	}

	/**
	 * @return the standardFolder
	 */
	public StandardFolder getStandardFolder() {
		return standardFolder;
	}

	/**
	 * @param standardFolder
	 *            the standardFolder to set
	 */
	public void setStandardFolder(StandardFolder standardFolder) {
		this.standardFolder = standardFolder;
	}

}
